package com.lxy.dataservice.controller;

import com.coxautodev.graphql.tools.GraphQLMutationResolver;
import com.coxautodev.graphql.tools.GraphQLQueryResolver;
import com.lxy.dataservice.entity.SoldNote;
import com.lxy.dataservice.service.SoldNoteService;
import com.nip.db.mongodb.utils.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * SoldNoteController
 *
 * @author < a href=" ">ZhangYang</ a>
 * @version v1.0.01
 * @date 2020-01-07 17:08
 */
@Component
public class SoldNoteController implements GraphQLQueryResolver, GraphQLMutationResolver {
  @Autowired
  SoldNoteService soldNoteService;

  public List<SoldNote> findAllSoldNote(Page page) {
    return soldNoteService.findAllSoldNote(page);
  }

  public List<SoldNote> findAllSoldNoteByUpdateTimeBetween(String from,String to) {
    return soldNoteService.findAllSoldNoteByUpdateTimeBetween(from,to);
  }

  }
